package com.jxau.subject.common.enums;

import lombok.Getter;

/**
 * 分类类型枚举
 *
 */
@Getter
public enum CategoruTypeEnum {
    PRIMARY(1, "岗位大类"),
    SECONND(0, "岗位下二级分类");



    private final int code;
    private final String desc;

    private CategoruTypeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static CategoruTypeEnum getByCode(int code) {
        for (CategoruTypeEnum e : CategoruTypeEnum.values()) {
            if (e.getCode() == code) {
                return e;
            }
        }
        return null;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

}
